<!DOCTYPE html>
<html>

<head>
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>百度地图标注</title>
  <style type="text/css">
    body {
      margin: 0;
      padding: 0;
    }

    #container {
      /* %  是百分比单位，相对于 父元素 */
      /* vw 也是百分比单位，相对于 视口宽度(viewport width) */
      /* vh 也是百分比单位，相对于 视口高度(viewport height) */
      width: 100vw;
      height: 100vh;
      border: 1px solid #f00;
      box-sizing: border-box;
    }
  </style>
   <script src="http://api.map.baidu.com/api?v=3.0&ak=eQzkGfNYjZulq8yab9tvbS17w8tqQ8xv"></script>
</head>
<body>
	<div id="container"></div>
</body>
</html>
<script>
	// 百度地图API功能
    var map = new BMap.Map("container");    
    var point = new BMap.Point(116.404, 39.915);    
    map.centerAndZoom(point, 15);    
    var marker = new BMap.Marker(point);        // 创建标注    
    map.addOverlay(marker);    
    marker.enableDragging()                 // 将标注添加到地图中 
</script>








